package com.punai.standard.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.punai.standard.domain.StaLinkFeature;
import com.punai.standard.domain.bo.FeatureBo;
import com.punai.standard.domain.template.StaClJxLinkFeatureExcel;
import com.punai.standard.domain.template.StaGxLinkFeatureExcel;
import com.punai.standard.domain.vo.StaSimplifyVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 分包特征关联Mapper接口
 *
 * @author zxw
 * @date 2022-12-13
 */
public interface StaLinkFeatureMapper extends BaseMapper<StaLinkFeature>
{
    /**
     * 查询分包特征关联
     *
     * @param id 分包特征关联主键
     * @return 分包特征关联
     */
    public StaLinkFeature selectStaLinkFbFeatureById(String id);

    /**
     * 查询分包特征关联列表
     *
     * @param staLinkFbFeature 分包特征关联
     * @return 分包特征关联集合
     */
    public List<StaLinkFeature> selectStaLinkFbFeatureList(StaLinkFeature staLinkFbFeature);

    List<StaGxLinkFeatureExcel> selectGxExport(@Param("versionId") String versionId, @Param("gxIds") List<String> gxIds);
    List<StaClJxLinkFeatureExcel> selectClJxExport(@Param("versionId") String versionId,@Param("itemIds") List<String> itemIds);


    /**
     * 删除分包特征关联
     *
     * @param id 分包特征关联主键
     * @return 结果
     */
    public int deleteStaLinkFbFeatureById(String id);

    /**
     * 批量删除分包特征关联
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteStaLinkFbFeatureByIds(String[] ids);

    List<FeatureBo> selectFeatureBo(@Param("itemIds") List<String> itemIds, @Param("type") String type, @Param("versionId") String versionId,@Param("companyId")Long companyId);
    String selectFeatureBoFb(@Param("itemIds") List<String> itemIds, @Param("versionId") String versionId,@Param("companyId")Long companyId);
    List<StaSimplifyVo> selectFeatureBoGx(@Param("itemIds") List<String> itemIds, @Param("versionId") String versionId,@Param("companyId")Long companyId);

    List<StaSimplifyVo> selectFeatureBoGxAll(@Param("versionId") String versionId,@Param("companyId")Long companyId);

    List<StaSimplifyVo> selectLinkFeature(@Param("itemIds") List<String> itemIds,@Param("versionId") String versionId, @Param("companyId") Long companyId);
}
